<?php

/**
 * EnqueteVoto form base class.
 *
 * @package    form
 * @subpackage enquete_voto
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 8508 2008-04-17 17:39:15Z fabien $
 */
class BaseEnqueteVotoForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'ip_usuario'       => new sfWidgetFormInputHidden(),
      'id_enquete'       => new sfWidgetFormInputHidden(),
      'id_enquete_opcao' => new sfWidgetFormInputHidden(),
      'created_at'       => new sfWidgetFormDateTime(),
      'updated_at'       => new sfWidgetFormDateTime(),
      'deleted'          => new sfWidgetFormInputCheckbox(),
    ));

    $this->setValidators(array(
      'ip_usuario'       => new sfValidatorDoctrineChoice(array('model' => 'EnqueteVoto', 'column' => 'ip_usuario', 'required' => false)),
      'id_enquete'       => new sfValidatorDoctrineChoice(array('model' => 'EnqueteVoto', 'column' => 'id_enquete', 'required' => false)),
      'id_enquete_opcao' => new sfValidatorDoctrineChoice(array('model' => 'EnqueteVoto', 'column' => 'id_enquete_opcao', 'required' => false)),
      'created_at'       => new sfValidatorDateTime(array('required' => false)),
      'updated_at'       => new sfValidatorDateTime(array('required' => false)),
      'deleted'          => new sfValidatorBoolean(),
    ));

    $this->widgetSchema->setNameFormat('enquete_voto[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'EnqueteVoto';
  }

}
